#! /bin/sh
# 守护模式启动应用，可用于开机启动
app=ecg-gateway-latest
pid=`ps -ef |grep 'java -jar'|grep $app|awk '{print $2}'`
if [ -n "$pid" ];then
	echo "----kill java process: "$pid
	sudo kill -9 $pid
fi
echo "++++start java process: "$app
echo "启动本地ECG服务网关"
nohup java -jar ecg-gateway-latest.jar --swagger.enabled=true --mongo.url=mongodb://127.0.0.1:27017 --service.ecgai.url=http://127.0.0.1:9085 > startup.log&
